package com.shadow.core.delegate.bottom;

import java.util.Objects;

/**
 * @author zhangyu
 * @date 2017/10/27
 */

public final class BottomTitleBean {
    /**
     * 变量存为final初始化传入多线程调用的时候就不会被更改
     */
    private final CharSequence ICON;
    private final CharSequence TITLE;

    public BottomTitleBean(CharSequence icon, CharSequence title) {
        ICON = icon;
        TITLE = title;
    }

    public CharSequence getIcon() {
        return ICON;
    }

    public CharSequence getTitle() {
        return TITLE;
    }
    @Override
    public boolean equals(Object o) {
        if (o == this) {
            return true;
        }
        if (!(o instanceof BottomTitleBean)) {
            return false;
        }
        BottomTitleBean bean = (BottomTitleBean) o;
        return Objects.equals(ICON, bean.getIcon()) &&
                Objects.equals(TITLE, bean.getTitle());
    }

    @Override
    public int hashCode() {
        return Objects.hash(ICON, TITLE);
    }
}
